/**
 * Copyright (c) 2006 RiseSoft Co.,Ltd  
 * $Header$
 */
package net.risesoft.risebi.collection.commons.miscellaneouse;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 *
 * @author <a href="mailto: chenjian@risesoft.net">陈健</a>
 * @version $Revision$
 * 
 */
public class ExtRecordsMeta implements Comparable, Serializable {
	
	private long results;
	private List rows;
	
	public long getResults() {
		return results;
	}
	public void setResults(long results) {
		this.results = results;
	}
	public List getRows() {
		return rows;
	}
	public void setRows(List rows) {
		this.rows = rows;
	}
	/**
	 * @see java.lang.Comparable#compareTo(Object)
	 */
	public int compareTo(Object object) {
		ExtRecordsMeta myClass = (ExtRecordsMeta) object;
		return new CompareToBuilder().append(this.rows, myClass.rows).append(this.results, myClass.results).toComparison();
	}
	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof ExtRecordsMeta)) {
			return false;
		}
		ExtRecordsMeta rhs = (ExtRecordsMeta) object;
		return new EqualsBuilder().appendSuper(super.equals(object)).append(this.rows, rhs.rows).append(this.results, rhs.results).isEquals();
	}
	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-2103923081, 1558712991).appendSuper(super.hashCode()).append(this.rows).append(this.results).toHashCode();
	}
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("rows", this.rows).append("results", this.results).toString();
	}
	
	

}
